<?php
$xajax = new xajax(); 
//$xajax->debugOn(); // Uncomment this line to turn debugging on
$xajax->registerFunction("logoutFunc");

$xajax->registerFunction("processFavorit");
$xajax->registerFunction("unfavoritFunc");
$xajax->registerFunction("reportProblem");
$xajax->registerFunction("hidePost");

$xajax->registerFunction("hideComment");
$xajax->registerFunction("processCommentForm");
$xajax->processRequests();
?>

<?php get_header(); ?>

<DIV id=container>
<br />

<DIV id=contents>

	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>	
<H2><A href="<?=get_option('siteurl')?>">首页</A> &#187; <?php the_post_title(); ?></H2>

<DIV class=news-summary id=news-<?php the_post_id(); ?> style="Z-INDEX: <?php get_z_index(); ?>;">

<DIV class=news-body>

<H3 id=title<?php the_post_id(); ?>><img align="absmiddle" border="0" src="<?php bloginfo('stylesheet_directory'); ?>/img/arrow-b.gif" width="20" height="20"> <A href="<?php the_post_url(); ?>" ><?php the_post_title(); ?></A> </H3>
<P class=news-submitted><A href="<?php the_siteurl(); ?>/?user=<?php the_post_author(); ?>"><?php the_post_author(); ?></A> 于 <?php the_past_time(); ?> 前提交 <span class=viaurl><?php get_viaurls(); ?></span><?php edit_post_link("[编辑]","<SPAN class=tool>","</SPAN>"); ?>

</P>
<P class=news-body-text><?php the_content(); ?> <img align="absmiddle" border="0" src="<?php bloginfo('stylesheet_directory'); ?>/img/arrow-s.gif" width="13" height="13" /></P>

<?php get_popup_urls(); ?>

<DIV class=news-details>
<A class="tool comments" href="<?php the_siteurl(); ?>/?q=<?php the_post_id(); ?>"><?php get_comment_text(); ?></A>
<SPAN class=tool>标签:<?php get_post_tags(); ?> </SPAN>

<?php hide_post_link("隐藏","<SPAN class=tool>","</SPAN>"); ?>

<?php if(get_currentuserinfo()): ?>

<ul class="probdrop" id="ul<?php the_post_id(); ?>" style="z-index:<?php get_z_index(); ?>;">
<li><a href="javascript://" onclick="HideandUNhideObj('<?php the_post_id(); ?>');" class="toplinep">问题反馈</a>
<div style="display: none;" id="div<?php the_post_id(); ?>">
 <ul>
      <li class="probdroplist"><a href="javascript://" onclick="javascript:xajax_reportProblem(<?php the_post_id(); ?>,<?php get_currentuserid(); ?>,1); HideandUNhideObj(<?php the_post_id(); ?>)" class="droplinep">重复的文章</a></li>
      <li class="probdroplist"><a href="javascript://" onclick="javascript:xajax_reportProblem(<?php the_post_id(); ?>,<?php get_currentuserid(); ?>,2); HideandUNhideObj(<?php the_post_id(); ?>)" class="droplinep">链接无法访问</a></li>
      <li class="probdroplist"><a href="javascript://" onclick="javascript:xajax_reportProblem(<?php the_post_id(); ?>,<?php get_currentuserid(); ?>,3); HideandUNhideObj(<?php the_post_id(); ?>)" class="droplinep">垃圾信息</a></li>
      <li class="probdroplist"><a href="javascript://" onclick="javascript:xajax_reportProblem(<?php the_post_id(); ?>,<?php get_currentuserid(); ?>,4); HideandUNhideObj(<?php the_post_id(); ?>)" class="droplinep">内容不准确</a></li>
</ul>
</div>
</li>
</ul>
<?php endif; ?>

</DIV>

<UL class=news-digg>
  <LI class="digg-count shade-<?php the_shade_id(); ?>" id=main0>
  <A id=diggs<?php the_post_id(); ?> href="<?php the_siteurl(); ?>/?q=<?php the_post_id(); ?>"><STRONG id=diggs-strong-<?php the_post_id(); ?>><?php the_favor_count(); ?></STRONG></A> 
  <LI class=digg-it id=diglink<?php the_post_id(); ?>><?php get_favorit_link(); ?>
  </LI>
</UL>
</DIV></DIV>



<div class="comment">
<h5><?php get_comment_text('trip'); ?>:</h5>

<div id=oc>

<?php the_comments(); ?>

</div>
</div>

	<?php if(get_currentuserinfo()): ?>
<div class="comment2">
<h5 id="creplyform">添加你的评论</h5>
<p class="c-reply-info" id="cforminfo" style="display:none"></p>
<ol>
<li>
<div class="c-info">by <strong><a href="<?php the_siteurl(); ?>/?user=<?php get_name_by_id(get_currentuserid(false)); ?>"><?php get_name_by_id(get_currentuserid(false)); ?></a></strong> &nbsp;
(HTML 标签不能使用)</div>
<div class="c-body">
<form id="submitForm1" action="javascript:void(null);" onsubmit="submitComment();">
<textarea name="comment" id="comment" rows="5" cols="20" onfocus=commentboxFocus();></textarea>

<div id="commentcaptcha" style="display: none;">
<br />请输入您看到的数字:<br />
<input type="text" name="captchatext" id="captchatext" value="" style="vertical-align: top;" size="8" maxlength="4"/> 
<img src="<?=get_option('siteurl'); ?>/tr-themes/checkbox.php?act=yes" align="absmiddle" class="captcha" alt="有问题请联系 <?=get_option('admin_email'); ?>" />
</div>
<span id="errormsg"><br /></span>
<input type="hidden" name="post_type" value="trip">
<input type="hidden" name="post_id" value="<?php the_post_id(); ?>">
<div><input type="submit" name="submit1" id="submit1" value="提交评论" /></div>
</form>
</div>
</li>
</ol>
</div>
	<?php else: ?>
发表评论请先<A HREF="<?php the_siteurl(); ?>/?login&redirect_to=<?=urlencode($_SERVER['REQUEST_URI']); ?>">登录</A>
	<?php endif; ?>



	<?php endwhile; else: ?>
		<?php header("location:404.php"); ?>
	<?php endif; ?>

</DIV>


<DIV id=sidebar>
<DIV class=boxed>
<DIV>
<?=get_option('top_news'); ?>

</DIV></DIV>

<DIV class=boxed2>
<DIV>
<P><A href="./?queue" class=submitbotton><em>&#187;</em>最新待选文章</A></P>
<hr style="color:#cbcacb; height:1px;" />
<P><A href="./?submit" class=submitbotton><em>&#187;</em>提交新的文章</A></P>
</DIV></DIV>

</DIV></DIV>
</DIV></DIV>
  
<?php get_footer(); ?>

